home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
misc_src
/
tabvie
/
tab.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-11-01
|
3KB
|
103 lines
// tab.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "tab.h"
#include "mainfrm.h"
#include "tabdoc.h"
#include "mainview.h"
#include "ctl3d.h"
#include "about.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabApp
BEGIN_MESSAGE_MAP(CTabApp, CWinApp)
//{{AFX_MSG_MAP(CTabApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabApp construction
CTabApp::CTabApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CTabApp object
CTabApp NEAR theApp;
/////////////////////////////////////////////////////////////////////////////
// CTabApp initialization
BOOL CTabApp::InitInstance()
{
Ctl3dRegister (m_hInstance);
Ctl3dAutoSubclass (m_hInstance);
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
SetDialogBkColor(); // set dialog background color to gray
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
EnableVBX();
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
AddDocTemplate(new CMultiDocTemplate(IDR_TABTYPE,
RUNTIME_CLASS(CTabDoc),
RUNTIME_CLASS(CMDIChildWnd), // MDI child frame
RUNTIME_CLASS(CMainView)));
// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
m_pMainWnd = pMainFrame;
// create a new (empty) document
OnFileNew();
if (m_lpCmdLine[0] != '\0')
{
// TODO: add command line processing here
}
return TRUE;
}
int CTabApp::ExitInstance()
{
Ctl3dUnregister (m_hInstance);
return CWinApp::ExitInstance();
}
// App command to run the dialog
void CTabApp::OnAppAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}
/////////////////////////////////////////////////////////////////////////////
// CTabApp commands